package vinl.me.spring;

import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

public class SpringFactory {

	private static final String CONFIG_PATH = "spring.cfg.xml";
	
	private static ClassPathResource res = new ClassPathResource(CONFIG_PATH);

	private static XmlBeanFactory factory = new XmlBeanFactory(res);
	
	private SpringFactory() {
		
	}
	
	public static Object getBean(String className) {
		Object obj = factory.getBean(className);
		return obj;
	}
}
